package com.t309.tzy.mapper;
import com.t309.tzy.entity.StorageRecord;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
/**
 * 入库记录表相关接口
 */
public interface StorageRecordMapper {
    public int insertStorage(StorageRecord sto);
    public int updateStorage(StorageRecord storage);
    public int deleteStorage(int id);

    List<StorageRecord> fuzzyQueryFindRecordByGoodsName(@Param("goodsName") String goodsName);
    List<StorageRecord> findRecordBySupplierId(@Param("supplierId") int supplierId);
    List<StorageRecord> findRecordByPayStatus(@Param("payStatus") int payStatus);
    List<StorageRecord> findRecordByGoodsNameAndSupplierIdAndPayStatus(@Param("goodsName") String goodsName,
                                                                       @Param("supplierId") Integer supplierId,
                                                                       @Param("payStatus") Integer payStatus);
    List<StorageRecord> findRecordByGoodsNameAndSupplierIdAndPayStatusAndCreatedTime(
            @Param("goodsName") String goodsName, @Param("supplierId") Integer supplierId,
            @Param("payStatus") Integer payStatus, @Param("createdTime") Date createdTime);
    //List<Record> findRecordByGoodsNameAndSupplierIdAndPayStatus(
    //            @Param("goodsName")String goodsName , @Param("supplierId")int supplierId,@Param("payStatus") int payStatus);
    //int insert(@Param(""));
}
